<template>
	<view>
		<u-navbar title-size="34" title="全部专辑" back-icon-color="#292940"  title-color="#292940" :border-bottom="false" :custom-back="tui.goBack" placeholder></u-navbar>
		<view class="content">
			<view v-for="item in albumList" @tap="toAlbum(item)" class="d-flex justify-content-between align-items-center album-list">
				<view class="d-flex">
					<view class="icon-album">
						<image src="/static/creation/icon-album.png"></image>
					</view>
					<view>
						<view class="album-title text-292940 fz-32">{{item.name}}</view>
						<view class="text-999BA8 fz-38 pt-1">{{item.works_count}} 作品</view>
					</view>
				</view>
				<image class="album-detail" src="/static/mine/me-more.png"></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				
			}
		},
		computed:{
			albumList(){
				return this.$store.state.user.albumList
			}
		},
		methods:{
			toAlbum(item){
				uni.navigateTo({
					url:`/pages/secondary/creation/album?name=${item.name}&id=${item.id}&user_id=${item.user_id}`
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content{
		padding:40upx 30upx;
		box-sizing: border-box;
		.album-list{
			width: 100%;
			height: 135upx;
			background: linear-gradient(133deg, rgba(248, 249, 251, .9) 0%, rgba(245, 246, 249, .9) 100%);
			border-radius: 10upx;
			padding: 28upx 30upx;
			box-sizing: border-box;
			margin-bottom: 30upx;
			.icon-album {
				width: 30upx;
				height: 30upx;
				margin-right: 10upx;
				margin-top: 8upx;
				image{
					width: 30upx;
					height: 30upx;
				}
			}
			.album-title{
				width:540upx;
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
			}
			.album-detail{
				width: 28upx;
				height: 28upx;
			}
		}
	}
</style>